<template>
  <vue-modal
    :title="title"
    ok-text="提交"
    cancel-text="取消"
    :show.sync="showNew"
    effect="fade"
    :small="true"
    :width="460"
    :callback="submit">
    <div slot="modal-body" class="modal-body">
      <form class="form-horizontal" role="form">
        <div class="form-group form-group-sm text-left">
          <label class="col-sm-3 control-label">*版块名称</label>
          <div class="col-sm-9 ">
            <div class="text-left">
              <input type="text" class="form-control input-sm" v-model="it.name" >
            </div>
          </div>
        </div>
        <div class="form-group form-group-sm text-left">
          <label class="col-sm-3 control-label">内容1</label>
          <div class="col-sm-9 ">
            <div class="text-left">
              <input type="text" class="form-control input-sm" v-model="it.data1" >
            </div>
          </div>
        </div>
        <div class="form-group form-group-sm text-left">
          <label class="col-sm-3 control-label">内容2</label>
          <div class="col-sm-9 ">
            <div class="text-left">
              <input type="text" class="form-control input-sm" v-model="it.data2" >
            </div>
          </div>
        </div>
        <div class="form-group form-group-sm text-left">
          <label class="col-sm-3 control-label">类别</label>
          <div class="col-sm-9 ">
            <div class="text-left">
              <select class="form-control" v-model="it.type">
                <option value="0">5.3以前的内容</option>
                <option value="1">资讯</option>
                <option value="2">精选组合</option>
                <option value="3">策略组合</option>
                <option value="4">智能工具</option>
              </select>
            </div>
          </div>
        </div>
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">图片</label>
          <div class="col-sm-9 text-left">
            <div class="pic-url" v-if="it.picUrl">
              原图：<br>
              <img :src="it.picUrl">
            </div>
            <input type="file" class="form-control" accept="image/jpeg,image/png" v-model="it.file" v-el:file>
          </div>
        </div>
      </form>
    </div>
  </vue-modal>
</template>
<style src="./product-new.css" scoped></style>
<script src="./product-new.js"></script>